﻿using SuperSocket.ProtoBase;
using System.Buffers;

namespace EasySocketNet.ProtoBase
{
    /// <summary>
    /// 透明包解码器
    /// </summary>
    public class TransparentPackageDecode : IPackageDecoder<TransparentPackageInfo>
    {
        public TransparentPackageInfo Decode(ref ReadOnlySequence<byte> buffer, object? context)
        {
            return new TransparentPackageInfo(buffer.ToArray());
        }
    }
}
